function login() {
    var username = document.getElementById("username").value	
   var pwd = document.getElementById("pwd").value	
   if (!localStorage.getItem("info")) {	
       alert("你还没注册,下个窗口跳转到注册界面")	
       location.replace("zhuce.html")	
       return	
   }	
   var info = JSON.parse(localStorage.getItem("info"))	
   if (username == info.username && pwd == info.pwd) {
       console.log("登录成功")
       location.replace("index.html")
   }else{	
       alert("用户名或密码错误，未注册请先注册")	
       location.replace("zhuce.html")
 }
}